/**
* @author: zhazhjie
* @email: zhazhjie@vip.qq.com
* @date: 2018-11-07 21:18:10
* @version: 1.0
*/

<template>
  <section>
    <tinymce ref="tinymce" :max-length="100" v-model='content'/>
    <el-button style="margin-top: 0.2rem" type='primary' @click='submit'>提交</el-button>
    <div v-html="content"></div>
  </section>
</template>

<script>
export default {
  data() {
    return {
      content: '666',
      showFlag: false
    };
  },
  components: {
    tinymce: (resolve) => require(['@/components/tinymce'], resolve)
  },
  methods: {
    submit() {
      this.$alert(this.content)
        .catch(res => {
        });
    },
    resetContent() {
      this.content = Math.random() + '';
      this.$refs.tinymce.resetContent(this.content);
    }
  },
  computed: {},
  mounted() {

  }
};
</script>

<style scoped>

</style>
